package com.ai.service.made.impl;

import com.ai.entity.network.L1ToDsSysMessage;
import com.ai.mapper.plc.L1ToDsMapper;
import com.ai.service.made.IL1SignalService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;


/**
 * @Author jiaok
 * @Date 2023-06-25 14:17
 */
@Slf4j
@Service
public class IL1SignalServiceImpl implements IL1SignalService {

    @Resource
    private L1ToDsMapper l1ToDsMapper;

    @Override
    public void receiveSignal(L1ToDsSysMessage message) {
        //查找最新的数据
        message.setCreateTime(LocalDateTime.now());
        l1ToDsMapper.save(message);
    }
    
}
